package com.liyao.storehouse.dao;

import com.liyao.storehouse.pojo.menu.MenuType;
import com.liyao.storehouse.pojo.users.Role;
import com.liyao.storehouse.pojo.users.user;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface userDao {
    List<user> gerUsers(@Param("page") int page, @Param("limit") int limit);

    int getUserCount();

    List<user> getUsersForDept(@Param("page")int page, @Param("limit")int limit, @Param("deptId") String deptId);

    int getUserCountForDept(@Param("deptId") String deptId);

    List<Role> getRole(int page, int limit);

    int getRoleCount();

    List<MenuType> getMenuList();

    int updateRole(@Param("roleName")String roleName, @Param("roleCont")String roleCont, @Param("id")String id);

    List<Integer> getAdminForRole(String id);

    void updateRole2(@Param("list") List<Integer> adminId, @Param("roleList") String roleList);
}
